<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>创建虚拟 DOM 对象 - JSX</title>
</head>
<body>
    <div id="root"></div>

    <script src="../js/react.development.js"></script>
    <script src="../js/react-dom.development.js"></script>
    <script src="../js/babel.min.js"></script>

    <script type="text/babel">
        // 1. 创建虚拟 DOM 对象   为了效率
        let vDOM = <div>
                <h2>荣誉之于生死，救赎之于荣誉</h2>
                <p>每个人都是月亮，总有一个阴暗面，从来不让人看见, 你怎么这么奇奇怪怪怪。。怪可爱的</p>
            </div>;

        // console.log(vDOM);
        // console.dir(document.querySelector('#root'));
        //2. 渲染
        ReactDOM.render(vDOM, document.querySelector('#root'));

    </script>
</body>
</html>